<?php
include 'controlador.php';

$c = new Controller();
$con = $c->checkSession();
?>
<html>
    <head>
        <title>
            <?php
            echo $c->getTitle(0);
            ?>
        </title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="http://fonts.googleapis.com/css?family=Arvo" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <!--<IMG border="0" align="middle" height="141" width="1350" src="images/head.jpg"> -->
    <body>

        <div id="wrapper">
            <div id="header">
                <div id="logo">			
                    <h1><a>
                            <?php
                            echo $c->getTitle(0);
                            ?>
                        </a></h1>
                    <p><a> 
                            <?php
                            echo $c->getTitle(1);
                            ?>			 
                        </a></p>
                </div>

            </div>
            <!-- end #header -->
            <div id="menu">
                <ul>
                    <li class="current_page_item"><a href="<?php echo $c->f_action(0); ?>"><img src="images/salir.png"/><?php echo $c->getLink(0); ?></a></li>			
                </ul>
            </div>

            <!-- end #menu -->
            <div id="page">
                <div id="page-bgbtm">
                    <div id="content">

                        <div class="post">
                            <h2 class="title">Cursos que se imparten:</h2>   
                            <p class="meta"/>
                            <div class="entry">
                                <div class="entry-bgtop">
                                    <div class="entry-bgbtm">
                                        <?php
                                        require_once 'DataGrid_1.php';

                                        $grid = new DataGrid_1("curso", '*', $con);                                        
                                        $grid->SetTypeColumn(2, TYPE_FLOAT);
					$grid->SetTypeColumn(3, TYPE_NUMBER);
                                        $grid->SetCellProperty(2, "align=right");
					$grid->SetCellProperty(3, "align=center");
                                        $grid->SetModeAdd(true);
                                        $grid->SetModeEdit(true);
                                        $grid->SetModeDelete(true);                                                                    
                                        $grid->Show();
                                        ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="post">                            
                            <h2 class="title">Ciclos para impartir cursos:</h2>
                            <p class="meta"/>
                            <div class="entry">
                                <div class="entry-bgtop">
                                    <div class="entry-bgbtm">
                                        <?php
                                        require_once 'DataGrid_1.php';

                                        $grid2 = new DataGrid_1("ciclo", '*', $con);                                        
                                        //$grid2->SetTypeColumn(2, TYPE_FLOAT);
					//$grid2->SetTypeColumn(3, TYPE_NUMBER);
                                        $grid2->SetCellProperty(2, "align=center");
					$grid2->SetCellProperty(3, "align=center");
                                        $grid2->SetModeAdd(true);
                                        $grid2->SetModeEdit(true);
                                        $grid2->SetModeDelete(true);                                                                    
                                        $grid2->Show()
                                        ?>
                                    </div>
                                </div>
                            </div>

                        </div> 

                        <div style="clear: both;">&nbsp;</div>
                    </div>
                    <!-- end #content -->
                    <div id="sidebar">
                        <?php echo $c->getOpciones(); ?>
                    </div>
                    <!-- end #sidebar -->
                    <div style="clear: both;">&nbsp;</div>
                </div>
            </div>
            <!-- end #page -->
        </div>	
        <div id="footer">
            <p><?php echo $c->getTexto(7); ?></p>
        </div>
    </body>
</html>
